package com.tedu.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

/**
 * Author：毕龙
 * Date: 2023/12/23 9:53
 * T  type
 * K  key
 * V  value
 * E  element
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
public class ResultVO<T> {
    private Integer status;
    private String message;
    private T data;

    public static <T> ResultVO success(T data,String message){
        return  new ResultVO(200,message,data);
    }

    public static ResultVO fail(String message){
        return  new ResultVO(201,message,null);
    }
}
